package exe3.carrent;

//客车
public class PassengerCar extends Car{
    private int seatNum;//客车座号


     public  PassengerCar(){}

    public PassengerCar(String carNum,String brand,double rent,int seatNum,boolean isLease,String model){
        super(carNum,brand,rent,isLease,model,seatNum);
        this.seatNum=seatNum;
    }

    public int getSeat() {
        return seatNum;
    }

    public void setSeat(int seat) {
        this.seatNum = seat;
    }

    @Override
    public double countRent(int days){
        double price;
        price=getRent()*days;
        if (days>=3&&days<7){
            price*=0.9;
        }else if (days>=7&&days<=30){
            price*=0.8;
        }else  if (days>=30&&days<=150){
            price*=0.7;
        }else if (days>=150){
            price*=0.6;
        }
        return price;
    }

    public void lease(String carNum){
    }
}
